<template>
  <div class="home">
    <div class="home--header">
      <div class="home--header-title">
        <i class="el-icon-back" @click="goBock"></i>
      </div>
      <div class="home--header-github">
        <!--            <img src="../images/github.svg"/>-->
      </div>
    </div>
    <div class="home--left">
      <div class="home--left-title">简介</div>
      <router-link class="home--left-link" to="/home"> 了解平台 </router-link>
      <div class="home--left-title">环境预备</div>
      <router-link class="home--left-link" to="/start"> Java & AndroidAdb </router-link>
      <div class="home--left-title">操作说明</div>
      <router-link class="home--left-link" to="/operate"> 安装 & 启动 </router-link>
      <router-link class="home--left-link" to="/csgl"> 测试管理 </router-link>
      <router-link class="home--left-link" to="/bggl"> 报告管理 </router-link>
    </div>
    <div class="home--content">
      <div class="home--content-page">
        <div class="home--content-view">
          <router-view/>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import 'highlight.js/styles/color-brewer.css';
import VcSnippet from '@/components/FastBot/snippet';

export default {
  data() {
    return {}
  },
  components: {
    'vc-snippet': VcSnippet
  },
  methods: {
    goBock() {
      this.goRoute('/')
    }
  }
}
</script>

<style lang="scss">
.home {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.home--header {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 64px;
  line-height: 64px;
  background-color: #fff;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.08);
}

.home--header-logo {
  float: left;
  padding-left: 25px;
  overflow: hidden;
  cursor: pointer;

  > img {
    height: 32px;
    vertical-align: middle;
    border-style: none;
  }
}

.home--header-title {
  height: 65px;
  line-height: 65px;
  font-size: 25px;
  display: inline-block;
  padding-left: 20px;
  font-weight: 700;
}

.home--left {
  position: fixed;
  z-index: 30;
  top: 65px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  width: 250px;
  font-size: 14px;
  margin: 30px 0;
  color: #3f536e;
  background: #fff;
  border-right: 1px solid #ececec;
}

.home--left-title {
  font-size: 16px;
  color: #333;
  line-height: 40px;
  height: 40px;
  margin: 0;
  padding: 4px 25px;
  text-decoration: none;
  display: block;
  position: relative;
  transition: 0.15s ease-out;
  font-weight: 700;
}

.home--left-link {
  font-size: 10px;
  color: #333;
  line-height: 40px;
  height: 40px;
  margin: 0;
  padding: 4px 25px;
  text-decoration: none;
  display: block;
  position: relative;
  transition: 0.15s ease-out;
  font-weight: 500;

  &:hover {
    color: #41a259;
  }
}

.home--header-github {
  position: absolute;
  height: 40px;
  width: 40px;
  right: 20px;
  top: 10px;
  color: #444444;
  transition: all 0.3s;
  cursor: pointer;

  &:hover {
    transform: scale(1.2);
  }

  > img {
    height: 100%;
    width: 100%;
  }
}

.router-link-exact-active {
  color: #41a259;
  background-color: #eeffde;
  border-right: 3px solid #41a259;
}

.home--content {
  height: calc(100% - 65px);
  overflow: auto;
  margin-top: 65px;
}

.home--content-page {
  padding-left: 250px;
}

.home--content-view {
  max-width: 1000px;
  padding: 30px 50px 60px 50px;
  margin: 0 auto;
}

body {
  width: 100%;
  height: 100%;
  color: #333333;
  font-size: 12px;
}

ul,
ol {
  list-style: none;
}

a {
  color: #333333;
  text-decoration: none;
  background-color: transparent;
  outline: none;
  transition: color 0.3s;
  cursor: pointer;
}

a:active,
a:hover {
  text-decoration: none;
  outline: 0;
}

.vc-snippet-doc {
  min-width: 600px;
  color: #3f536e;
  font-size: 14px;
  line-height: 1.5;

  > .tip,
  > .warning {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 20px 0;
    line-height: 1.3;
  }

  > .tip {
    background-color: #ecf8ff;
    border-left: 5px solid #6190e8;
  }

  > .warning {
    background-color: #fff6f7;
    border-left: 5px solid #fe6c6f;
  }

  > h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 22px 0 18px;
  }

  > h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 18px 0 10px;
  }

  > h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0 10px;
  }

  > p {
    line-height: 1.8;
    color: #3f536e;
    font-size: 14px;
    margin-bottom: 5px;
  }

  > p > code {
    background: #e6effb;
    border-radius: 3px;
    color: #5e6d82;
    padding: 2px 8px;
  }

  > table {
    border-collapse: collapse;
    border-spacing: 0;
    empty-cells: show;
    border: 1px solid #ebedf0;
    width: 100%;
    margin: 8px 0 16px;
    font-size: 14px;

    th,
    td {
      color: #314659;
      border: 1px solid #ebedf0;
      text-align: left;
      padding: 8px 10px;
      vertical-align: middle;

      code {
        background: #e6effb;
        border-radius: 3px;
        color: #5e6d82;
        padding: 2px 8px;
      }
    }

    th {
      white-space: nowrap;
      color: #333333;
      font-weight: 500;
      background-color: #fafafa;
    }
  }

  > .hljs {
    padding: 0;
  }

  > ol {
    > li {
      margin: 8px 0 8px 20px;
      padding-left: 0;
      list-style-type: decimal;
      line-height: 1.6;
    }
  }

  code {
    background: #e6effb;
    border-radius: 3px;
    color: #5e6d82;
    padding: 2px 8px;
  }

  a:not(.n-link) {
    text-decoration: none;
    color: #333333;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    a.n-snippent--markdown-it-anchor {
      opacity: 0;
    }

    &:hover a.n-snippent--markdown-it-anchor {
      opacity: 1;
      transition: opacity 0.3s;
    }
  }
}

.hljs > code {
  border: 1px solid #f0f2f7;
  background: #e3e2e2;
  font-family: Consolas, Menlo, Courier, monospace;
  display: block;
  font-size: 14px;
  padding: 8px 16px;
  line-height: 1.5;
  border-radius: 5px;
}

.hljs-comment {
  color: #608b4e;
}
</style>
